fix simditor upload bug

FFIB 5 years ago
parent
commit
3e81499401
2 changed files with 4 additions and 4 deletions
  1. 1 1
      kodosale/settings.py
  2. 3 3
      simditor/urls.py

+ 1 - 1
kodosale/settings.py

@@ -230,7 +230,7 @@ SIMDITOR_TOOLBAR = [
230 230
 SIMDITOR_CONFIGS = {
231 231
     'toolbar': SIMDITOR_TOOLBAR,
232 232
     'upload': {
233
-        'url': '/simditor/upload/',
233
+        'url': '/simditor/upload',
234 234
         'fileKey': 'upload',
235 235
         'image_size': 1024 * 1024 * 4  # max image size 4MB
236 236
     },

+ 3 - 3
simditor/urls.py

@@ -13,13 +13,13 @@ if django.VERSION >= (2, 0):
13 13
     # pylint disable=C0103
14 14
     from django.urls import path
15 15
     urlpatterns = [
16
-        path('upload/', staff_member_required(views.UPLOAD),
16
+        path('upload', staff_member_required(views.UPLOAD),
17 17
              name='simditor_upload'),
18 18
     ]
19 19
 elif django.VERSION >= (1, 8):
20 20
     # pylint disable=C0103
21 21
     urlpatterns = [
22
-        url(r'^upload/', staff_member_required(views.UPLOAD),
22
+        url(r'^upload', staff_member_required(views.UPLOAD),
23 23
             name='simditor_upload'),
24 24
     ]
25 25
 else:
@@ -28,7 +28,7 @@ else:
28 28
     # pylint disable=C0103
29 29
     urlpatterns = patterns(
30 30
         '',
31
-        url(r'^upload/', staff_member_required(views.UPLOAD),
31
+        url(r'^upload', staff_member_required(views.UPLOAD),
32 32
             name='simditor_upload'),
33 33
     )
34 34